﻿<!DOCTYPE HTML>
<html>

<head>
  <title>BlueLight DICOMWeb Search</title>
  <meta charset="UTF-8">
  <meta content="IE=edge" http-equiv="X-UA-Compatible">
  <meta content="no-cache" http-equiv="cache-control">
  <meta content="no-cache" http-equiv="pragma">
  <meta content="0" http-equiv="expires">
  <meta name="viewport" content="width=device-width, minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">

  <script src="../scripts/toolfunction.js"></script>
  <script src="../scripts/readsome.js"></script>
  <script src="../scripts/onload.js"></script>

  <link rel="stylesheet" href="../css/bootstrap.min.css"
    integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<style>
  .PatientRow:hover {
    background-color: #DFE7F2 !important;
    color: #000000
  }
  .SecondRow:hover {
    background-color: #fff282 !important;
    color: #000000
  }
  .SecondRow2:hover {
    background-color: #8ad4ff !important;
    color: #000000
  }
  .size14{
    font-size: 14px;
  }
  .SecondRow2 td, .SecondRow2 th{
  border-color: black;
  } 
  .SecondRow td, .SecondRow th{
  border-color: black;
  }
</style>
<script>
  function kerypressT(e) {
    if (e.keyCode == 13) {
      getByid('searchButton').onclick()
    }
  }

</script>

<body style="background-color:#000000;color:#FFFFFF" onkeypress="kerypressT(event);">
  <div style="margin-top: 7px;">
    
    　PatientID：<input type="text" style="width: 100px;height:28px;" name="lname" id="PatientIDText" value="*"
      class="size14 btn btn-dark text-left">
    PatientName：<input type="text" style="width: 100px;height:28px;" name="lname" id="PatientNameText"
      class="size14 btn btn-dark text-left">
    StudyDate：<span onfocusout ="
    setTimeout(function(){ 
      var obj1=document.activeElement;
    if(!(obj1===getByid('StudyDateText')||obj1===getByid('StudyDatedate1')||obj1===getByid('StudyDatedate2')||obj1===getByid('dateDiv')))
    {getByid('dateDiv').style.display='none';getByid('dateBr').style.display='none';}
    setStudyDateByKeyPress();
  }, 200);
    ">
   
    <input type="text" name="lname" style="width: 160px;height:28px;" id="StudyDateText" class="size14 btn btn-dark text-left" onkeydown="setStudyDateByKeyPress()"  onfocus="
    getByid('dateDiv').style.display='';
    getByid('dateDiv').style.marginLeft= (this.getClientRects()[0].x-80)+'px';getByid('dateBr').style.display='';
    "> 
     <div id="dateDiv" style="position:absolute;display:none;">
        <input type="date" class="size14 btn btn-dark text-left" id="StudyDatedate1" name="date"  style="width: 150px;height:25px;" value="" onchange="setStudyDate()"> -
        <input type="date" class="size14 btn btn-dark text-left" id="StudyDatedate2" name="date"  style="width: 150px;height:25px;" value="" onchange="setStudyDate()">
    </div>
  
  </span>   Accession Number：<input type="text" name="lname" style="width: 220px;height:28px;" id="AccessionNumberText"
      class="size14 btn btn-dark text-left">
    <br> <br id="dateBr" style="display:none;">
    　Modality：&nbsp;<input type="text" name="lname" style="margin-top: 3px;width: 100px;height:28px;" id="ModalitiesInStudyText"
      class="size14 btn btn-dark text-left">
    　StudyUID：&nbsp;<input type="text" style="margin-top: 3px;width: 180px;height:28px;" name="lname" id="StudyInstanceUIDText"
      class="size14 btn btn-dark text-left">
    <!--&nbsp;&nbsp;Password：<input type="password" name="lname" value="123" id="PasswordText" class="btn btn-dark text-left">-->
    &nbsp;&nbsp;Limit：&nbsp;<input type="number" name="lname" style="margin-top: 3px;width: 80px;height:28px;" value="10" id="LimitInput"
      data-decimals="2" class="size14 btn btn-dark text-left">
    &nbsp;&nbsp;&nbsp;&nbsp;Offset：&nbsp;<input type="number" name="lname" style="margin-top: 3px;width: 80px;height:28px;" value="0"
      id="OffsetInput" data-decimals="2" class="size14 btn btn-dark text-left">&nbsp;&nbsp;&nbsp;&nbsp;


    <button type="button" id="searchButton" style="margin-top: 2px;" class="btn btn-dark" onclick="
  //if(!PasswordCheck())return;
  getByid('loadingSpan').style.display='';
  if(getByid('floatTable'))getByid('floatTable').style.display='none';
  if(getByid('floatTable2'))getByid('floatTable2').style.display='none';
  SerchState++;
  Patient.patientName = '';
  Patient.StudyAmount = 0;
  Patient.Study = [];
  LoacationSercher='?';
  if(getByid('PatientIDText').value!='')
  LoacationSercher+='&PatientID='+ encodeURI(encodeURI(''+getByid('PatientIDText').value));
  if(getByid('StudyDateText').value!='')
  LoacationSercher+='&StudyDate='+ encodeURI(encodeURI(''+getByid('StudyDateText').value));
  if(getByid('PatientNameText').value!='')
  LoacationSercher+='&PatientName='+ encodeURI(encodeURI(''+getByid('PatientNameText').value));
  if(getByid('ModalitiesInStudyText').value!='')
  LoacationSercher+='&ModalitiesInStudy='+ encodeURI(encodeURI(''+getByid('ModalitiesInStudyText').value));
  if(getByid('AccessionNumberText').value!='')
  LoacationSercher+='&AccessionNumber='+ encodeURI(encodeURI(''+getByid('AccessionNumberText').value));
  if(getByid('StudyInstanceUIDText').value!='')
  LoacationSercher+='&StudyInstanceUID='+ encodeURI(encodeURI(''+getByid('StudyInstanceUIDText').value));


  if(getByid('LimitInput').value!='') LoacationSercher+='&limit='+ encodeURI(encodeURI(''+getByid('LimitInput').value));
  if(getByid('OffsetInput').value!='') LoacationSercher+='&offset='+ encodeURI(encodeURI(''+getByid('OffsetInput').value));
  //LoacationSercher+='&limit=2&offset=4';
  if (getByid('myTable1')) {
    var elem = getByid('myTable1');
    elem.parentElement.removeChild(elem);
  }
  readAllJson();
  ">search</button>
  </div>
  
  <button class="previous btn btn-dark" onclick="
  getByid('OffsetInput').value= parseInt(getByid('OffsetInput').value)- parseInt(getByid('LimitInput').value);
  getByid('searchButton').click();
  ">&#8249;</button>
  <button class="next btn btn-dark" onclick="
  getByid('OffsetInput').value= parseInt(getByid('OffsetInput').value)+ parseInt(getByid('LimitInput').value);
  getByid('searchButton').click();
  ">&#8250;</button><span id="loadingSpan">  Loading...</span>
  <div id="body"></div>
  <button class="previous btn btn-dark" onclick="
  getByid('OffsetInput').value= parseInt(getByid('OffsetInput').value)- parseInt(getByid('LimitInput').value);
  getByid('searchButton').click();
  ">&#8249;</button>
  <button class="next btn btn-dark" onclick="
  getByid('OffsetInput').value= parseInt(getByid('OffsetInput').value)+ parseInt(getByid('LimitInput').value);
  getByid('searchButton').click();
  ">&#8250;</button>
 <!--<header class="page-header" style="display:none">
  </header>-->
</body>

</html>